package com.xnx3.kefu.chat.controller;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import com.xnx3.j2ee.controller.BaseController;
import com.xnx3.j2ee.service.SqlService;
import com.xnx3.kefu.core.util.KefuPropertiesUtil;
import com.xnx3.kefu.chat.vo.ConfigVO;

/**
 * 一些配置
 * @author 管雷鸣
 */
@Controller(value="kefuChatConfigController")
@RequestMapping("/kefu/chat/config/")
public class ConfigController extends BaseController {
	@Resource
	private SqlService sqlService;

	/**
	 * 获取网络配置，比如websocket、api接口地址
	 */
	@RequestMapping(value="getNetConfig${api.suffix}", method = RequestMethod.POST)
	@ResponseBody
	public ConfigVO getNetConfig(HttpServletRequest request,
			@RequestParam(value = "id", required = false , defaultValue="") String id){
		ConfigVO vo = new ConfigVO();
		vo.setApi(KefuPropertiesUtil.getProperty("kefu.api"));
		vo.setSocket(KefuPropertiesUtil.getProperty("kefu.socket"));
		return vo;
	}
	
	
}
